package ztttt1;

import java.util.*;
public class Main7 {
    //蓝桥杯 2023 省 B 飞机降落
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        while(T-- > 0){
            int Time = 0;
            int N = in.nextInt();
            int[] Ti = new int[15];
            int[] Di = new int[15];
            int[] Li = new int[15];
            int[] DownT = new int[15];
            Ti[0] = in.nextInt();
            Di[0] = in.nextInt();
            Li[0] = in.nextInt();
            int index = 0;
            int minTi = Ti[0];
            int minDi = Di[0];
            for(int i = 1;i < N;i++){
                Ti[i] = in.nextInt();
                Di[i] = in.nextInt();
                Li[i] = in.nextInt();
                if(Ti[i] < minTi){
                    minTi = Ti[i];
                    minDi = Di[i];
                    index = i;
                }
                if(Ti[i] <= minTi && Di[i] < minDi){
                    minTi = Ti[i];
                    minDi = Di[i];
                    index = i;
                }
                if(Ti[i] == minTi && Di[i] == minDi && Li[index] > Li[i]){
                    minTi = Ti[i];
                    minDi = Di[i];
                    index = i;
                }
                DownT[i] = Ti[i] + Di[i];
            }
            Time += Li[index];
            a:for(int i = 0;i < N;i++){
                DownT[i] -= Time;
                Time += Li[i];
                for(int j = 0;j < N ;j++){
                    if(DownT[j] <= 0){
                        System.out.println("No");
                        break a;
                    }
                }
                System.out.println("Yes");
            }
        }
    }
    //蓝桥杯 2020 省 AB 乘法表
    public static void main1(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for(int i = 1;i < n;i++){
            for(int j = 1;j <= i;j++){
                int num = i * j;
                String s = doNum(num,n);
                String s1 = doNum(i,n);
                String s2 = doNum(j,n);
                System.out.print(s1 + "*" + s2 + "=" + s + " ");
            }
            System.out.println();
        }
    }
    public static String doNum(int num,int n){
        if(num < n){
            if(num < 10) {
                return String.valueOf(num);
            }else {
                char c = (char)('A' + num - 10);
                return String.valueOf(c);
            }
        }
        StringBuilder sb = new StringBuilder();
        int max = 0;
        for(int i = 1;;i++){
            int tmp = (int)Math.pow(n,i);
            if(num / tmp < n && num / tmp != 0){
                max = i;
                break;
            }
        }
        while(max-- >= 0){
            int tmp = (int)Math.pow(n,(max + 1));
            if(num / tmp < 10) {
                sb.append(num / tmp);
            }else{
                char c = (char)('A' + num / tmp - 10);
                sb.append(c);
            }
            num -= tmp * (num / tmp);
        }
        String s = sb.toString();
        return s;
    }
}
//(10)  (4)
//  9 -> 21
//
//
// 21 -> 10101
// 每次操作使num除以对应n的x次方
// 若 (结果 < n 且 结果 != 0)
// 则此为num的n进制的最大数
